]> dgit.raspbian.org Git - gnome-shell.git/commit
workspace: Center window previews horizontally and vertically
authorJonas Dreßler <verdre@v0yd.nl>
Thu, 14 Jan 2021 21:48:15 +0000 (22:48 +0100)
committerMarge Bot <marge-bot@gnome.org>
Thu, 8 Apr 2021 17:51:15 +0000 (17:51 +0000)
commitdda23fc4c6ac4cb34758d04f9b6afaf2003ed626
tree96fc31489821f29319269b38423155a290733ffe
parent6f0589313d886fe0848384ef29fecd22ea09405d
workspace: Center window previews horizontally and vertically

Window previews looks slightly offset to the left and top right now
because we don't use the same padding on all edges of the Workspace. We
do that because the oversize and overlap of the window previews is
different on all sides (for example the bottom overlap is very large
because there we show the window title).

To make sure window previews are always perfectly centered on the
Workspace, only use the largest one of the oversize values as spacing
and padding, and add the larger one of the overlap values for the
vertical padding in addition.

With this, we now center the window previews on the Workspace while
never overpainting the allocation of that Workspace to show overlays.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3634

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1670>
js/ui/workspace.js